package org.doubango.FrCall.Screens;

import org.doubango.FrCall.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class EmailRegisterOk extends Activity {
	private EditText nickName;
	private Button complete;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.register_email_ok);
		
		nickName = (EditText) findViewById(R.id.nickname);
		complete = (Button) findViewById(R.id.e_reg_ok);
		
		complete.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				if(valete()){
				Intent intent = new Intent(EmailRegisterOk.this,ScreenLogin.class);
				startActivity(intent);
				finish();
				}
			}
		});
		
	}
	private boolean valete(){
		String s=nickName.getText().toString();
		if(s.equals("")){
			Toast.makeText(getApplicationContext(), "昵称为必填",Toast.LENGTH_LONG).show();
			return false;
		}
		return true;
	}
}
